<div class="order-list-page" ng-if="pagedata.op == 'list'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">待牵线任务</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content' style="top:0">
		<div style="padding:0.5rem">
		<div class="fui-cell-group radius" ng-repeat="item in pagedata.list">
					<div class="fui-cell">
						<div class="fui-cell-label" style="width:3.5rem" href="javascript:;" ng-click="access_json('jy_ailiao/memberitem//mid='+item.member.mid)">
							<img class="round" style="width:3rem;height:3rem;border-radius:3rem" ng-src="{{tomedia(item.member.avatar) || '../addons/jy_ailiao/resource/images/nologo.png'}}">
						</div>
						<div class="fui-cell-text" style="margin-top:0.16rem">
							<div class="title" style="font-size:0.76rem">
								<span class="bold" style="font-size:0.8rem;width:auto;margin-right:0.2rem">{{item.member.nickname || 0}}</span>
								<i ng-if="item.member.sex==2" class="icon icon-nv red"></i>
								<i ng-if="item.member.sex==1" class="icon icon-nan" style="color:#18bc9c"></i>
							</div>
							<div class="subtitle" style="font-size:0.65rem">
								{{item.member.city}} <span class="bold" style="color:#18bc9c">·</span> {{item.member.age || '**'}}岁 <span class="bold" style="color:#18bc9c">·</span> {{item.member.zhiwei || '**'}} <span class="bold" style="color:#18bc9c">·</span> {{item.member.height || '**'}}
							</div>
							<div class="subtitle" style="font-size:0.65rem">
								{{item.member.realname || '无真实姓名'}}
								<a href="tel:{{item.member.mobile}}" style="color:#18bc9c">{{item.member.mobile || '无电话'}}</a>
							</div>
						</div>
						<div class="fui-cellone-remark noremark">
							<span class="jylabel jylabel-success active" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">约瓶方</span>
						</div>
					</div>
					<div class="fui-cell">
						<div class="fui-cell-label" style="width:3.5rem" href="javascript:;" ng-click="access_json('jy_ailiao/memberitem//mid='+item.tomember.mid)">
							<img class="round" style="width:3rem;height:3rem;border-radius:3rem" ng-src="{{tomedia(item.tomember.avatar) || '../addons/jy_ailiao/resource/images/nologo.png'}}">
						</div>
						<div class="fui-cell-text" style="margin-top:0.16rem">
							<div class="title" style="font-size:0.76rem">
								<span class="bold" style="font-size:0.8rem;width:auto;margin-right:0.2rem">{{item.tomember.nickname || 0}}</span>
								<i ng-if="item.tomember.sex==2" class="icon icon-nv red"></i>
								<i ng-if="item.tomember.sex==1" class="icon icon-nan" style="color:#18bc9c"></i>
							</div>
							<div class="subtitle" style="font-size:0.65rem">
								{{item.tomember.city}} <span class="bold" style="color:#18bc9c">·</span> {{item.tomember.age || '**'}}岁 <span class="bold" style="color:#18bc9c">·</span> {{item.tomember.zhiwei || '**'}} <span class="bold" style="color:#18bc9c">·</span> {{item.tomember.height || '**'}}
							</div>
							<div class="subtitle" style="font-size:0.65rem">
								{{item.tomember.realname || '无真实姓名'}}
								<a href="tel:{{item.tomember.mobile}}" style="color:#18bc9c">{{item.tomember.mobile || '无电话'}}</a>
							</div>
						</div>
						<div class="fui-cellone-remark noremark">
							<span class="jylabel jylabel-red active" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">被约方</span>
						</div>
					</div>
					<div class="fui-cell-title r-f">
						<span class="status">
							<div class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'/worker.qorder/getlog/','id='+item.id)">接手牵线任务</div>
						</span>
					</div>
        </div>
		</div>
	</div>
	<div class="content-empty" ng-show="pagedata.list.length == 0 ">
		  <i class="icon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有牵线任务！</p>
	</div>
</div>
<div ng-include="sys_html('worker/_footer')"></div>
<div class="fe-floatright-bottom" style="bottom:5rem">
<a ng-if="pagedata.isopenvoice!=1" ng-click="pagedata.isopenvoice=1;pagedata.openvoice(true)" href="javascript:;"><i class="icon icon-nolingsheng0"></i></a>
<a ng-if="pagedata.isopenvoice==1" ng-click="pagedata.isopenvoice=0;pagedata.openvoice(false)" href="javascript:;"><i class="icon icon-lingsheng0"></i></a> 
</div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source src="../core/resource/images/neworker.mp3"></source>
</audio>
<script>
scope.tool.get_list('jy_ailiao/worker.qorder/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_ailiao/worker.qorder/list/');
}
scope.pagedata.openvoice=function(type){
	var voicetime = {};
    var openvoice;
	if(type || scope.pagedata.isopenvoice==1){
		 openvoice = setInterval(() => {
			if(scope.pagedata.isopenvoice!=1){
				clearInterval(openvoice);
				return false;
			}
			scope.get('jy_ailiao/worker.index/getnew/',function(res){
						console.log('openvoice');console.log(res);
						if(res!='none'){
							if(!voicetime[res.id]){
								voicetime[res.id]=1;
								$("#openvoice")[0].play();
							}
							if(scope.pagedata.status==2){
								scope.tool.get_list('jy_ailiao/worker.worker/list/status='+scope.pagedata.status,true);
							}
						}
			});
		}, 5000);
	}else{
		scope.get('jy_ailiao/worker.index/setopenvoice/isopenvoice=0',function(res){});
	}
}
scope.pagedata.openvoice();
</script>